package bpm.dao.impl.proposal;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.RowMapper;

import bpm.domain.proposal.ProposalField;

public class ProposalFieldMapper implements RowMapper {

	public Object mapRow(ResultSet rs, int i) throws SQLException {
		 ProposalField pf=new ProposalField();
		 if(rs!=null){
			 pf.setKey(rs.getString("FIELD_KEY"));
			 pf.setName(rs.getString("FIELD_NAME"));
			 pf.setDocDefID(rs.getInt("DOC_DEF_ID"));
			 pf.setDocKey(rs.getString("DOC_FIELD_KEY"));
			 pf.setDefaultValue(rs.getString("DEFAULT_VALUE"));
			 pf.setCallBack(rs.getString("CALL_BACK"));
			 pf.setCallBackParameter(rs.getString("CALL_BACK_PARAMETER"));
			 pf.setDescription(rs.getString("DESCRIPTION"));
		 }
		return pf;
		
	}
}
